package com.hm.hsw3;

import java.io.FileReader;
import java.io.FileWriter;

public class Demo1 {
    public static void main(String[] args) {
        try(//创建一个读取流
                FileReader fileReader=new FileReader("ccc.txt");
                ){
            char[] c = new char[1024];
            int len;
            while(true){
                len= fileReader.read(c);
                if(len==-1){
                    break;
                }
                String s = new String(c, 0, len);
                System.out.print(s);
            }

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
